//
//  GoodsDomain.m
//  AppleCilent
//
//  Created by Nail Sharipov on 05/04/14.
//  Copyright (c) 2014 Nail Sharipov. All rights reserved.
//

#import "GoodsDomain.h"

@implementation GoodsDomain
{
    int goodsId;
    float price;
    NSString* name;
    NSString* description;
    NSString* ico;
    NSString* image;
    NSString* properties;
}

- (id)init:(NSDictionary*) data {
    self = [super init];
    goodsId = [[data objectForKey:@"id"] intValue];
    price = [[data objectForKey:@"price"] floatValue];
    name = [data objectForKey:@"name"];
    description = [data objectForKey:@"description"];
    image = [data objectForKey:@"image"];
    ico = [data objectForKey:@"ico"];
    properties = [data objectForKey:@"properties"];
    return self;
}


- (int) getId
{
    return goodsId;
}

- (float) getPrice
{
    return price;
}

- (NSString*) getName
{
    return name;
}

- (NSString*) getDescription
{
    return description;
}

- (NSString*) getIco
{
    return ico;
}

- (NSString*) getImage
{
    return image;
}

- (NSString*) getProperties
{
    return properties;
}

@end
